<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>@yield('title')</title>
    <link rel="stylesheet" href="{{ URL::asset('/') }}skin/layui/css/layui.css">
    @yield('js/css')
    <style type="text/css">
        [v-cloak]{ display: none; }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header layui-bg-green">
        <a href="{{ url('admin') }}"><div class="layui-logo" style="color: white">管理后台</div></a>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="">控制台</a></li>
            <li class="layui-nav-item"><a href="">商品管理</a></li>
            <li class="layui-nav-item"><a href="">用户</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    贤心
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>
    
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                @foreach($menuList as $menu)
                    <li class="layui-nav-item {{ $menu['is_open'] == 1 ? 'layui-nav-itemed' : ''}}">
                        <a href="javascript:;">{{ $menu['name'] }}</a>
                        @if (!empty($menu['children']))
                            <dl class="layui-nav-child">
                                @foreach($menu['children'] as $val)
                                    <dd class="{{ $val['is_open'] == 1 ? 'layui-this' : ''}}"><a href="{{ URL::route($val['route']) }}">{{ $val['name'] }}</a></dd>
                                @endforeach
                            </dl>
                        @endif
                    </li>
                @endforeach
                <!-- <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">管理员管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="{{ url('admin/admins') }}">管理员列表</a></dd>
                        <dd><a href="{{ url('admin/nodes') }}">节点列表</a></dd>
                        <dd><a href="{{ url('admin/roles') }}">角色列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="">发布商品</a></li> -->
            </ul>
        </div>
    </div>
    
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">@yield('content')</div>
    </div>
    
    <div class="layui-footer">
      <!-- 底部固定区域 -->
      © SimpleLiving
    </div>
</div>
<script src="{{ URL::asset('/') }}skin/layui/layui.js"></script>
<script src="{{ URL::asset('/') }}skin/lib/jquery.js"></script>
<script>
//JavaScript代码区域
layui.use('element', function(){
    var element = layui.element;
  
});
</script>
<script src="{{ URL::asset('/') }}skin/layui/lay/modules/layer.js"></script>

@yield('script')

</body>
</html>